() of text () is a reporter block and is a operators block. It reports the length of a given text, or the all-lowercase or the all-uppercase forms of the text.

([length v] of text [world]::operators) //5
([lower case v] of text [World]::operators) //world
([upper case v] of text [world]::operators) //WORLD

Example Uses

It can be used to decide who wins in a length-based typing competition:

if <([length v] of text (P1 text)::operators) \> ([length v] of text (P2 text)::operators)> {
say [The winner is Player 1]
} else {
say [The winner is Player 2]
}::control

Workarounds

([length v] of (split [hello world] by (letter v)::operators)::list)

See Also